<?php


namespace app\common\validate;


use think\Validate;

class User extends Validate
{
    protected $rule=[
        'uname|姓名'=>'require',
        'age|年龄'=>'require',
        'sex|性别'=>'require',
        'address|地址'=>'require',
        'tel|电话'=>'require',
    ];
    //登录验证场景-创建validate目录和校验php
    public function sceneAdd()
    {
        return $this->only(['uname','age','sex','address','tel']);
    }
    public function sceneEdit()
    {
        return $this->only(['uname','age','sex','address','tel']);
    }
}